/*
 * debug.c
 *
 *  Created on: Sep 6, 2008
 *      Author: pierre
 */
#include <stdio.h>

#include "util/debug.h"

static op_bool debugging=true;
static FILE* debug_io=NULL;

/*
void debug(const char* filename,int nLine, const char* fmt, )
	{

	}*/

void debug_setDebugging(op_bool allow)
	{
	debugging=allow;
	}

op_bool debug_isDebugging()
	{
	return debugging==true;
	}

FILE* debug_getStream()
	{
	return debug_io==null?stderr:debug_io;
	}

void debug_setStream(FILE* io)
	{
	debug_io=(io==NULL?stderr:io);
	}

